package com.mysoft.gfyx.clue.controller;

import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.clue.mip.OpptySubsSearchService;
import com.mysoft.gfyx.clue.service.OpptySubsService;
import com.mysoft.gfyx.clue.service.OpptysubsTimingJobService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

//商机订阅控制器
@PubService(value = "/testDataApi", prefix = RequestPrefix.API)
@Tag(name = "测试-API")
public class TestDataApiController {

    @Resource
    private OpptySubsSearchService opptySubsSearchService;

    @Resource
    private OpptySubsService opptysubsService;

    @Resource
    private OpptysubsTimingJobService opptysubsTimingJobService;

    /**
     * 测试
     */
    @PubAction(value = "/opptySubsSearchTimingJobHandlerExec", method = RequestMethod.POST)
    public String opptySubsSearchTimingJobHandlerExec(int p) throws Exception {
        opptysubsTimingJobService.opptySubsSearchTimingJobHandlerExec();
        return "yes";
    }

    @PubAction(value = "/opptySubsPushTimingJobHandlerExec", method = RequestMethod.POST)
    public String opptySubsPushTimingJobHandlerExec(int p) {
        opptysubsTimingJobService.opptySubsPushTimingJobHandlerExec();
        return "yes";
    }
}
